unit WrapperXPMenu;

interface

uses Sysutils, Forms, Classes, XPMenu;

type
  TWrapperXPMenu = class(TComponent)
  private
    XPMenu: TXPMenu;
    AActive: boolean;
    procedure SetActive(const Value: boolean);
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    property Active: boolean read AActive write SetActive;
  end;

implementation

{ TWrapperXPMenu }

constructor TWrapperXPMenu.Create(AOwner: TComponent);
begin
  XPMenu := TXPMenu.Create(AOwner);
  XPMenu.Gradient := True;
  XPMenu.Font.Name := Screen.MenuFont.Name;
end;

destructor TWrapperXPMenu.Destroy;
begin
  SetActive(False);
  FreeAndNil(XPMenu);
end;

procedure TWrapperXPMenu.SetActive(const Value: boolean);
begin
  AActive := Value;
  XPMenu.Active := Value;
end;

end.
